<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="box">
      <form autocomplete="on">
        姓名：<input type="text" name="username" v-model="username" />
        <br />
        年龄：<input type="number" name="age" v-model="age" />

        <br />
        <textarea v-model="text"></textarea>
      </form>

      <p v-html="text"></p>
    </div>

    <button onclick="cancal()">取消挂载</button>

    <script src="vue.global.js"></script>
    <script>
      const app = Vue.createApp({
        data() {
          return {
            username: "",
            age: 0,
            text: "hello",
          };
        },
        methods: {},
      });

      const vm = app.mount("#box");

      function cancal() {
        app.unmount();
      }
    </script>
  </body>
</html>
